﻿module Enferno.Public.Web.Components.ViewModels.Interfaces {

    export interface ICheckoutViewModel extends IComponentViewModel {

        update(checkoutModel: Models.CheckoutModelBase<Models.ICheckoutPayerModel, Models.ICheckoutShipToModel>);
        updatePaymentMethods(paymentMethods: Array<Models.PaymentMethodModel>);
        updateDeliveryMethods(deliveryMethods: Array<Models.DeliveryMethodModel>);
        toModel(): Models.CheckoutModelBase<Models.ICheckoutPayerModel, Models.ICheckoutShipToModel>;

        getIsCompanyMode(): boolean;
        getOrganisationNumber(): string;
        getSocialSecurityNumber(): string;

        setSelectedPaymentMethod(id: number);
        setSelectedDeliveryMethod(id: number);
        setIsEditable(isEditable: boolean);
        setIsCompanyMode(isCompanyMode: boolean);

        setPaymentErrorMessage(errorMessage: string);
        setGeneralErrorMessage(errorMessage: string);
        setPersonCompanyDetailsFetchErrorMessage(errorMessage: string);

        clearPaymentErrorMessage();
        clearGeneralErrorMessage();
        clearPersonCompanyDetailsFetchErrorMessage();
    }
}  